//
//  AXFEliteCell.m
//  BEEQUICK
//
//  Created by HH on 16/11/24.
//  Copyright © 2016年 SevenGroup. All rights reserved.
//

#import "AXFEliteCell.h"

@implementation AXFEliteCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    if (self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]) {
        [self setupUI];
    }
    
    return self;
}

- (void)setupUI
{
    UILabel *nameLabel = [UILabel cz_labelWithText:@"康师傅小鸡炖蘑菇面" fontSize:12 color:[UIColor blackColor]];
    
    [self.contentView addSubview:nameLabel];
    
    UILabel *countLabel = [UILabel cz_labelWithText:@"X3" fontSize:12 color:[UIColor blackColor]];
    
    [self.contentView addSubview:countLabel];
    
    UILabel *priceLabel = [UILabel cz_labelWithText:@"¥3" fontSize:12 color:[UIColor blackColor]];
    
    [self.contentView addSubview:priceLabel];
    
    [nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.left.offset(5);
        make.centerY.equalTo(self.contentView);
    }];
    
    [countLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.offset(-self.contentView.frame.size.width / 3);
        make.centerY.equalTo(self.contentView);
    }];
    
    [priceLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.right.offset(-12);
        make.centerY.equalTo(self.contentView);
    }];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
